﻿package bakudo.engines.mapEngine.view.scene.actors {
	import flash.display.Bitmap;
	import flash.geom.Point;	
	import flash.events.Event;	
	import flash.display.MovieClip;
	
	/**
	 * @author Michał Rabiński
	 */
	public class SceneActor extends MovieClip {

		
		public var ready : Boolean;
		
		public var firstTimer : Boolean;
		
		
		
		protected var removable : Boolean;
		
		
		
		public function SceneActor() {
			addEventListener(Event.ADDED_TO_STAGE, onATS, false, 0, true);
			setView();
		}
	

		
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	// PUBLIC METHODS
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
		/**
		 * Zwraca widok w postaci bitmapy, wymaga nadpisania
		 * @return bitmapa
		 */
		public function getView():Bitmap {
			return null;
		}

		
		
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	// PROTECTED METHODS
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
		/**
		 * Tworzy widok, wymaga nadpisania
		 */	
		protected function setView():void {
			
		}
		
		protected function init():void {
			ready = true;
		}

		
		
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	// PRIVATE LISTENERS
	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	
		private function onATS(event : Event) : void {
			removeEventListener(Event.ADDED_TO_STAGE, onATS);
			init();
		}
	}
}
